package com.qf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.entity.Pie;
import com.qf.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface UserDao extends BaseMapper<User> {
    // 批量数据插入
    int batchInsertUsers(List<User> userList);

    //动态查询
    List<User> dynamicQuery(@Param("name") String name, @Param("sex") String sex, @Param("status") Integer status,
                            @Param("email") String email, @Param("afterDate") Date afterDate,
                            @Param("endDate") Date endDate);

    //新增用户统计
    List<Map<String, Integer>> getAddUser();

    //n天内用户增长数据
    List<Map<String, Object>> getNDayUser(@Param("n") Integer n);
}

